<%@page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>

<table class="table table-striped table-bordered">
  <thead>
    <tr>
      <th>Código</th>
      <th>Nome</th>
      <th>Ações</th>
    </tr>
  </thead>
  <tbody>
  	<c:forEach var="secretaria" items="${secretarias}">
	    <tr>
	      <td><c:out value="${secretaria.codigo}" /></td>
	      <td><c:out value="${secretaria.descricao}" /></td>
	      <td>
	      	<c:url var="urlAtulizarSecretaria" value="/secretaria/alterar/${secretaria.id}" />
	      	<a href="${urlAtulizarSecretaria}" title="Alterar">
	      		<span class="glyphicon glyphicon-wrench"></span>
	      	</a>
	      	&nbsp;&nbsp;
	      	<a href="#" title="Excluir" id="${secretaria.id}" class="linkRemoverSecretaria">
	      		<span class="glyphicon glyphicon-remove"></span>
	      	</a>
	      </td>
	    </tr>
    </c:forEach>
  </tbody>
</table>

<tiles:insertAttribute name="paginacao" />

<script type="text/javascript" src="<c:url value="/resources/js/secretaria/secretaria_lista.js" />"></script>